package com.legrand.www.module.constant;

/**
 * @author xiah
 * 2018-06-27 11:17:35
 * token的加密类型
 */
public enum EncryptionType {
    /**
     * MD5 采用md5加密方式对token进行加密
     */
    MD5,
    /**
     * SHA 采用SHA加密方式对token进行加密
     */
    SHA;

    public static Boolean checkEncryptionType(String type) {
        EncryptionType[] ss = EncryptionType.values();
        if(type==null){
            return false;
        }
        EncryptionType inPutType=EncryptionType.valueOf(type);
        for (EncryptionType encryptionType : ss) {
            if (encryptionType.equals(inPutType)) {
                return true;
            }
        }
        return false;
    }
}
